package com.example.yoga.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author liwenkai
 * @since 2021-02-03
 */
@TableName("user_combo")
public class UserCombo extends Model<UserCombo> {

    private static final long serialVersionUID = 1L;

    /**
     * 用户表主键
     */
    @TableId("userId")
    private Integer userid;

    /**
     * 套餐表主键，用户买了哪些套餐
     */
    @TableField("comboId")
    private Integer comboid;

    /**
     * 购买套餐日期
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone ="GMT+8")
    @TableField("buytime")
    private Date buytime;

    /**
     * 套餐结束时间
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone ="GMT+8")
    @TableField("endtime")
    private Date endtime;


    public Integer getUserid() {
        return userid;
    }

    public void setUserid(Integer userid) {
        this.userid = userid;
    }

    public Integer getComboid() {
        return comboid;
    }

    public void setComboid(Integer comboid) {
        this.comboid = comboid;
    }

    public Date getBuytime() {
        return buytime;
    }

    public void setBuytime(Date buytime) {
        this.buytime = buytime;
    }

    public Date getEndtime() {
        return endtime;
    }

    public void setEndtime(Date endtime) {
        this.endtime = endtime;
    }

    @Override
    protected Serializable pkVal() {
        return this.userid;
    }

    @Override
    public String toString() {
        return "UserCombo{" +
        "userid=" + userid +
        ", comboid=" + comboid +
        ", buytime=" + buytime +
        ", endtime=" + endtime +
        "}";
    }
}
